var express = require('express');
var http = require('http');
var app = express();

var port = 8061;
app.set('post',port);
var server = http.createServer(app);
server.listen(port,function () {
    console.log('---------------create server listen on :' + port + '---------------');
});

// var server = app.listen(8081, function () {
//     var host = server.address().address;
//     var port = server.address().port;
//     console.log("应用实例，访问地址为 http://%s:%s", host, port)
// });

app.route('/post')
    .post(function (req,res,next) {
        var form = {};
        form = req.body;
        var query = req.query;
        console.log(JSON.stringify(form));
    });

app.route('')
    .get(function (req, res, next) {
        res.end('alsdfjk');
    });
